package com.ftg.learn.chapter8.pattern.factory;

/**
 * 猫工厂
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/8/3 上午9:06
 */
public class CatFactory {


    /**
     * 帮你创建 实例
     * @return
     */
    public static Cat instanceCat(String type){
        Cat c = new Cat();
        c.setType(type);
        return c;
    }

    public static Cat instanceCatByName(String name){
        Cat c = new Cat();
        c.setType(name);
        return c;
    }

    public static Cat instanceCat(String name,String type){
        Cat c = new Cat();
        c.setType(type);
        c.setType(name);
        return c;
    }

}
